package edu.sctu.practice.class02.yangyuran.assign03.assign3_01;

/**
 * Created by Administrator on 2015/10/22.
 */
public class Rectangle extends GeometricObject {
    public double Length;
    public double Width;
    public double Area;
    public double Preimeter;

    @Override
    public double findArea() {
        Area = Length * Width;
        return Area;
    }

    @Override
    public double findPerimeter() {
        Preimeter = (Length + Width) * 2;
        return Preimeter;
    }

    public Rectangle(String color, double Length, double Width) {
        super(color);
        this.Length = Length;
        this.Width = Width;
    }

    public String toString() {
        return "矩形：";
    }
}
